home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / CIncludes / CMMComponent.h < prev   
Encoding:
C/C++ Source or Header  |  1997-02-18  |  6.3 KB  |  171 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Components
  5.  
  6.      Version:    ColorSync 2.1
  7.  
  8.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  9.                  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __CMMCOMPONENT__
  19. #define __CMMCOMPONENT__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __COMPONENTS__
  28. #include <Components.h>
  29. #endif
  30. #ifndef __CMAPPLICATION__
  31. #include <CMApplication.h>
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT_SUPPORTED
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_ALIGN_SUPPORTED
  43. #pragma options align=mac68k
  44. #endif
  45.  
  46.  
  47. enum {
  48.     CMMInterfaceVersion            = 1
  49. };
  50.  
  51. /* Component function selectors */
  52. /* Required */
  53.  
  54. enum {
  55.     kCMMInit                    = 0,
  56.     kNCMMInit                    = 6,
  57.     kCMMMatchColors                = 1,
  58.     kCMMCheckColors                = 2
  59. };
  60.  
  61. /* Optional */
  62.  
  63. enum {
  64.     kCMMValidateProfile            = 8,
  65.     kCMMFlattenProfile            = 14,
  66.     kCMMUnflattenProfile        = 15,
  67.     kCMMMatchBitmap                = 9,
  68.     kCMMCheckBitmap                = 10,
  69.     kCMMMatchPixMap                = 3,
  70.     kCMMCheckPixMap                = 4,
  71.     kCMMConcatenateProfiles        = 5,
  72.     kCMMConcatInit                = 7,
  73.     kCMMNewLinkProfile            = 16,
  74.     kCMMGetPS2ColorSpace        = 11,
  75.     kCMMGetPS2ColorRenderingIntent = 12,
  76.     kCMMGetPS2ColorRendering    = 13,
  77.     kCMMGetPS2ColorRenderingVMSize = 17,
  78.     kCMMGetNamedColorInfo        = 70,
  79.     kCMMGetNamedColorValue        = 71,
  80.     kCMMGetIndNamedColorValue    = 72,
  81.     kCMMGetNamedColorIndex        = 73,
  82.     kCMMGetNamedColorName        = 74
  83. };
  84.  
  85. extern pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
  86.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  87.  
  88. extern pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
  89.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  90.  
  91. extern pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
  92.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  93.  
  94. extern pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
  95.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  96.  
  97. /* Optional functions */
  98. extern pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
  99.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  100.  
  101. extern pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
  102.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  103.  
  104. extern pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
  105.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  106.  
  107. extern pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  108.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  109.  
  110. extern pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  111.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  112.  
  113. extern pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  114.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  115.  
  116. extern pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
  117.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  118.  
  119. extern pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
  120.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  121.  
  122. extern pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  123.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  124.  
  125. extern pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  126.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  127.  
  128. extern pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  129.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  130.  
  131. extern pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  132.  FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  133.  
  134. extern pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
  135.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  136.  
  137. extern pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  138.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  139.  
  140. /* Named Color functions */
  141. extern pascal CMError CMMGetNamedColorInfo(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
  142.  FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  143.  
  144. extern pascal CMError CMMGetNamedColorValue(ComponentInstance CMSession, CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  145.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  146.  
  147. extern pascal CMError CMMGetIndNamedColorValue(ComponentInstance CMSession, CMProfileRef prof, unsigned long index, CMColor *deviceColor, CMColor *PCSColor)
  148.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  149.  
  150. extern pascal CMError CMMGetNamedColorIndex(ComponentInstance CMSession, CMProfileRef prof, StringPtr name, unsigned long *index)
  151.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  152.  
  153. extern pascal CMError CMMGetNamedColorName(ComponentInstance CMSession, CMProfileRef prof, unsigned long index, StringPtr name)
  154.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  155.  
  156.  
  157. #if PRAGMA_ALIGN_SUPPORTED
  158. #pragma options align=reset
  159. #endif
  160.  
  161. #if PRAGMA_IMPORT_SUPPORTED
  162. #pragma import off
  163. #endif
  164.  
  165. #ifdef __cplusplus
  166. }
  167. #endif
  168.  
  169. #endif /* __CMMCOMPONENT__ */
  170.  
  171.